package com.bdqn.t330;

import com.bdqn.t330.entity.Right;
import com.bdqn.t330.mapper.RightMapper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.ApplicationContext;
import org.springframework.test.context.junit4.SpringRunner;

import javax.annotation.Resource;
import java.util.Arrays;

@SpringBootTest
@RunWith(SpringRunner.class)
public class RightTester {

    @Resource
    ApplicationContext applicationContext;

    @Resource
    RightMapper rightMapper;

    @Test
    public void getRightId() {
/*        String[] beanDefinitionNames = applicationContext.getBeanDefinitionNames();
        Arrays.sort(beanDefinitionNames);
        for (String beanDefinitionName : beanDefinitionNames) {
            System.out.println(beanDefinitionName);
        }*/
        Right right = rightMapper.selectById("L0603");
        System.out.println(right.getRightUrl());

    }


}
